// Copyright DustedPixels.com 2008. All rights reserved.

package com.dustedpixels.jasmin.chips;

/**
 * @author micapolos@gmail.com (Michal Pociecha-Los)
 */
public final class FastAdderImpl implements FastAdder {
  private int sum;
  public void update(Pins pins, int cycles) {
    int i = 0;
    int[] IN = pins.IN;
    int[] OUT = pins.OUT;
    while (cycles-- != 0) {
      sum += IN[i];
      OUT[i] = sum;
      i++;
    }
  }
}
